package sample.ws.entity;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * AccessRuleRepository..
 *
 * @author Lizhong
 * @date 2019/7/15
 */
@Repository
public interface ServiceRepository extends JpaRepository<ServiceEntity,Long> {

    ServiceEntity findAllByIdAndEnableIsTrue( Long id );

    List<ServiceEntity> findAllByEnableIsTrue( );

    List<ServiceEntity> findAllByEnableIsTrueAndState(Integer state );

    ServiceEntity findByName(String name);
}
